/**
 * 
 */
package kr.co.insoft.core.model.configration.sev;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlRootElement;

import kr.co.insoft.auth.model.security.User;
import flexjson.JSONSerializer;

/**
 * TABLE : T_VARIABLE
 * 
 * @author IN-SOFT Inc. GoodwillDD(sylee@in-soft.co.kr)
 * 
 */
@XmlRootElement
public class SEVEntityModel implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -715645747810155810L;
	String variableid;
	String variableName;
	String variableDesc;
	String variableLimitId;
	String updatedDate;
	Long userid;
	String companyid;
	String writer;
	List<SEVMetadataEntityModel> variables = new ArrayList<SEVMetadataEntityModel>();

	public String toString() {
		return (new JSONSerializer()).deepSerialize(this);
	}
	
	public SEVEntityModel() {
		this.variables = new ArrayList<SEVMetadataEntityModel>();
		this.variables.add(new SEVMetadataEntityModel());
	}

	public void setAuth(User user) {
		this.userid = user.getId();
		this.companyid = user.getCompanyId();
	}
	
	/**
	 * @return the variableid
	 */
	public String getVariableid() {
		return variableid;
	}

	/**
	 * @param variableid
	 *            the variableid to set
	 */
	public void setVariableid(String variableid) {
		this.variableid = variableid;
	}

	/**
	 * @return the variableName
	 */
	public String getVariableName() {
		return variableName;
	}

	/**
	 * @param variableName
	 *            the variableName to set
	 */
	public void setVariableName(String variableName) {
		this.variableName = variableName;
	}

	/**
	 * @return the variableDesc
	 */
	public String getVariableDesc() {
		return variableDesc;
	}

	/**
	 * @param variableDesc
	 *            the variableDesc to set
	 */
	public void setVariableDesc(String variableDesc) {
		this.variableDesc = variableDesc;
	}

	/**
	 * @return the variableLimitId
	 */
	public String getVariableLimitId() {
		return variableLimitId;
	}

	/**
	 * @param variableLimitId
	 *            the variableLimitId to set
	 */
	public void setVariableLimitId(String variableLimitId) {
		this.variableLimitId = variableLimitId;
	}

	/**
	 * @return the updatedDate
	 */
	public String getUpdatedDate() {
		return updatedDate;
	}

	/**
	 * @param updatedDate
	 *            the updatedDate to set
	 */
	public void setUpdatedDate(String updatedDate) {
		this.updatedDate = updatedDate;
	}

	/**
	 * @return the userid
	 */
	public Long getUserid() {
		return userid;
	}

	/**
	 * @param userid
	 *            the userid to set
	 */
	public void setUserid(Long userid) {
		this.userid = userid;
	}

	/**
	 * @return the variables
	 */
	public List<SEVMetadataEntityModel> getVariables() {
		return variables;
	}

	/**
	 * @param variables
	 *            the variables to set
	 */
	public void setVariables(List<SEVMetadataEntityModel> variables) {
		this.variables = variables;
	}

	/**
	 * @return the companyid
	 */
	public String getCompanyid() {
		return companyid;
	}

	/**
	 * @param companyid the companyid to set
	 */
	public void setCompanyid(String companyid) {
		this.companyid = companyid;
	}

	/**
	 * @return the writer
	 */
	public String getWriter() {
		return writer;
	}

	/**
	 * @param writer the writer to set
	 */
	public void setWriter(String writer) {
		this.writer = writer;
	}

}
